namespace ext.data
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <definedin>src\data\Tree.js</definedin>
	/// <definedin>src\data\Tree.js</definedin>
	[ScriptName("Node")]
	[ScriptNamespace("Ext.data")]
	[Imported()]
	public partial class Node : ext.util.Observable
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		public Node()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>Fires when a new child node is appended</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("appendEventName")]
		public const string AppendEventName = "append";
		
		/// <summary>Fires when a child node is removed</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("removeEventName")]
		public const string RemoveEventName = "remove";
		
		/// <summary>Fires when this node is moved to a new location in the tree</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("moveEventName")]
		public const string MoveEventName = "move";
		
		/// <summary>Fires when a new child node is inserted.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("insertEventName")]
		public const string InsertEventName = "insert";
		
		/// <summary>Fires before a new child is appended, return false to cancel the append.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("beforeappendEventName")]
		public const string BeforeappendEventName = "beforeappend";
		
		/// <summary>Fires before a child is removed, return false to cancel the remove.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("beforeremoveEventName")]
		public const string BeforeremoveEventName = "beforeremove";
		
		/// <summary>Fires before this node is moved to a new location in the tree. Return false to cancel the move.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("beforemoveEventName")]
		public const string BeforemoveEventName = "beforemove";
		
		/// <summary>Fires before a new child is inserted, return false to cancel the insert.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("beforeinsertEventName")]
		public const string BeforeinsertEventName = "beforeinsert";
		#endregion
		
		#region Properties
		/// <summary>The attributes supplied for the node. You can use this property to access any custom attributes you supplied.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("attributes")]
		[IntrinsicProperty()]
		public object Attributes
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		#endregion
		
		#region Methods
		/// <summary>Returns true if this node is a leaf</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("isLeaf")]
		public bool IsLeaf()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns true if this node is the last child of its parent</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("isLast")]
		public bool IsLast()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns true if this node is the first child of its parent</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("isFirst")]
		public bool IsFirst()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns true if this node has one or more child nodes, else false.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("hasChildNodes")]
		public bool HasChildNodes()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Returns true if this node has one or more child nodes, or if the expandable
		/// node attribute is explicitly specified as true (see {@link #attributes}), otherwise returns false.
		/// </summary>
		/// <htmlSummary>
		/// Returns true if this node has one or more child nodes, or if the &lt;tt&gt;expandable&lt;/tt&gt;
		/// node attribute is explicitly specified as true (see {@link #attributes}), otherwise returns false.
		/// </htmlSummary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("isExpandable")]
		public bool IsExpandable()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Removes a child node from this node.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="node">The node to remove</param>
		/// <param name="destroy">&lt;tt&gt;true&lt;/tt&gt; to destroy the node upon removal. Defaults to &lt;tt&gt;false&lt;/tt&gt;.</param>
		/// <returns>The removed node</returns>
		[ScriptName("removeChild")]
		public ext.data.Node RemoveChild(ext.data.Node node, bool destroy)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Destroys the node.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("destroy")]
		public void Destroy()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Inserts the first node before the second node in this nodes childNodes collection.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="node">The node to insert</param>
		/// <param name="refNode">The node to insert before (if null the node is appended)</param>
		/// <returns>The inserted node</returns>
		[ScriptName("insertBefore")]
		public ext.data.Node InsertBefore(ext.data.Node node, ext.data.Node refNode)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Removes this node from its parent</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="destroy">&lt;tt&gt;true&lt;/tt&gt; to destroy the node upon removal. Defaults to &lt;tt&gt;false&lt;/tt&gt;.</param>
		/// <returns>this</returns>
		[ScriptName("remove")]
		public ext.data.Node RemoveMethod(bool destroy)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Removes all child nodes from this node.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="destroy">&lt;tt&gt;true&lt;/tt&gt; to destroy the node upon removal. Defaults to &lt;tt&gt;false&lt;/tt&gt;.</param>
		/// <returns>this</returns>
		[ScriptName("removeAll")]
		public ext.data.Node RemoveAll(bool destroy)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns the child node at the specified index.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="index"></param>
		[ScriptName("item")]
		public ext.data.Node Item(System.Number index)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Replaces one child node in this node with another.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="newChild">The replacement node</param>
		/// <param name="oldChild">The node to replace</param>
		/// <returns>The replaced node</returns>
		[ScriptName("replaceChild")]
		public ext.data.Node ReplaceChild(ext.data.Node newChild, ext.data.Node oldChild)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns the index of a child node</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="node"></param>
		/// <returns>The index of the node or -1 if it was not found</returns>
		[ScriptName("indexOf")]
		public System.Number IndexOf(ext.data.Node node)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns the tree this node is in.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("getOwnerTree")]
		public ext.data.Tree GetOwnerTree()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns depth of this node (the root node has a depth of 0)</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("getDepth")]
		public System.Number GetDepth()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Changes the id of this node.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="id">The new id for the node.</param>
		[ScriptName("setId")]
		public void SetId(string id)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns true if this node is an ancestor (at any point) of the passed node.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="node"></param>
		[ScriptName("contains")]
		public bool Contains(ext.data.Node node)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns true if the passed node is an ancestor (at any point) of this node.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="node"></param>
		[ScriptName("isAncestor")]
		public bool IsAncestor(ext.data.Node node)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Insert node(s) as the last child node of this node.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="node">The node or Array of nodes to append</param>
		/// <returns>The appended node if single append, or null if an array was passed</returns>
		[ScriptName("appendChild")]
		public ext.data.Node AppendChild(ext.data.Node node)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Insert node(s) as the last child node of this node.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="node">The node or Array of nodes to append</param>
		/// <returns>The appended node if single append, or null if an array was passed</returns>
		[ScriptName("appendChild")]
		public ext.data.Node AppendChild(System.Array node)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns the path for this node. The path can be used to expand or select this node programmatically.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="attr">The attr to use for the path (defaults to the node&apos;s id)</param>
		/// <returns>The path</returns>
		[ScriptName("getPath")]
		public string GetPath(string attr)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns the path for this node. The path can be used to expand or select this node programmatically.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <returns>The path</returns>
		[ScriptName("getPath")]
		public string GetPath()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Bubbles up the tree from this node, calling the specified function with each node. The arguments to the function
		/// will be the args provided or the current node. If the function returns false at any point,
		/// the bubble is stopped.
		/// </summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">The function to call</param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the current Node.</param>
		/// <param name="args">The args to call the function with (default to passing the current Node)</param>
		[ScriptName("bubble")]
		public void Bubble(System.Delegate fn, object scope, System.Array args)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Bubbles up the tree from this node, calling the specified function with each node. The arguments to the function
		/// will be the args provided or the current node. If the function returns false at any point,
		/// the bubble is stopped.
		/// </summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">The function to call</param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the current Node.</param>
		[ScriptName("bubble")]
		public void Bubble(System.Delegate fn, object scope)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Bubbles up the tree from this node, calling the specified function with each node. The arguments to the function
		/// will be the args provided or the current node. If the function returns false at any point,
		/// the bubble is stopped.
		/// </summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">The function to call</param>
		[ScriptName("bubble")]
		public void Bubble(System.Delegate fn)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Cascades down the tree from this node, calling the specified function with each node. The arguments to the function
		/// will be the args provided or the current node. If the function returns false at any point,
		/// the cascade is stopped on that branch.
		/// </summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">The function to call</param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the current Node.</param>
		/// <param name="args">The args to call the function with (default to passing the current Node)</param>
		[ScriptName("cascade")]
		public void Cascade(System.Delegate fn, object scope, System.Array args)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Cascades down the tree from this node, calling the specified function with each node. The arguments to the function
		/// will be the args provided or the current node. If the function returns false at any point,
		/// the cascade is stopped on that branch.
		/// </summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">The function to call</param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the current Node.</param>
		[ScriptName("cascade")]
		public void Cascade(System.Delegate fn, object scope)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Cascades down the tree from this node, calling the specified function with each node. The arguments to the function
		/// will be the args provided or the current node. If the function returns false at any point,
		/// the cascade is stopped on that branch.
		/// </summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">The function to call</param>
		[ScriptName("cascade")]
		public void Cascade(System.Delegate fn)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Interates the child nodes of this node, calling the specified function with each node. The arguments to the function
		/// will be the args provided or the current node. If the function returns false at any point,
		/// the iteration stops.
		/// </summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">The function to call</param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the current Node in the iteration.</param>
		/// <param name="args">The args to call the function with (default to passing the current Node)</param>
		[ScriptName("eachChild")]
		public void EachChild(System.Delegate fn, object scope, System.Array args)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Interates the child nodes of this node, calling the specified function with each node. The arguments to the function
		/// will be the args provided or the current node. If the function returns false at any point,
		/// the iteration stops.
		/// </summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">The function to call</param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the current Node in the iteration.</param>
		[ScriptName("eachChild")]
		public void EachChild(System.Delegate fn, object scope)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Interates the child nodes of this node, calling the specified function with each node. The arguments to the function
		/// will be the args provided or the current node. If the function returns false at any point,
		/// the iteration stops.
		/// </summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">The function to call</param>
		[ScriptName("eachChild")]
		public void EachChild(System.Delegate fn)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Finds the first child that has the attribute with the specified value.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="attribute">The attribute name</param>
		/// <param name="value">The value to search for</param>
		/// <param name="deep">True to search through nodes deeper than the immediate children</param>
		/// <returns>The found child or null if none was found</returns>
		[ScriptName("findChild")]
		public ext.data.Node FindChild(string attribute, object value, bool deep)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Finds the first child that has the attribute with the specified value.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="attribute">The attribute name</param>
		/// <param name="value">The value to search for</param>
		/// <returns>The found child or null if none was found</returns>
		[ScriptName("findChild")]
		public ext.data.Node FindChild(string attribute, object value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Finds the first child by a custom function. The child matches if the function passed returns true.</summary>
		/// <htmlSummary>Finds the first child by a custom function. The child matches if the function passed returns &lt;code&gt;true&lt;/code&gt;.</htmlSummary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">A function which must return <c>true</c> if the passed Node is the required Node.</param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the Node being tested.</param>
		/// <param name="deep">True to search through nodes deeper than the immediate children</param>
		/// <returns>The found child or null if none was found</returns>
		[ScriptName("findChildBy")]
		public ext.data.Node FindChildBy(System.Delegate fn, object scope, bool deep)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Finds the first child by a custom function. The child matches if the function passed returns true.</summary>
		/// <htmlSummary>Finds the first child by a custom function. The child matches if the function passed returns &lt;code&gt;true&lt;/code&gt;.</htmlSummary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">A function which must return <c>true</c> if the passed Node is the required Node.</param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the Node being tested.</param>
		/// <returns>The found child or null if none was found</returns>
		[ScriptName("findChildBy")]
		public ext.data.Node FindChildBy(System.Delegate fn, object scope)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Finds the first child by a custom function. The child matches if the function passed returns true.</summary>
		/// <htmlSummary>Finds the first child by a custom function. The child matches if the function passed returns &lt;code&gt;true&lt;/code&gt;.</htmlSummary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">A function which must return <c>true</c> if the passed Node is the required Node.</param>
		/// <returns>The found child or null if none was found</returns>
		[ScriptName("findChildBy")]
		public ext.data.Node FindChildBy(System.Delegate fn)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Sorts this nodes children using the supplied sort function.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">A function which, when passed two Nodes, returns -1, 0 or 1 depending upon required sort order.</param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the browser window.</param>
		[ScriptName("sort")]
		public void Sort(System.Delegate fn, object scope)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Sorts this nodes children using the supplied sort function.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		/// <param name="fn">A function which, when passed two Nodes, returns -1, 0 or 1 depending upon required sort order.</param>
		[ScriptName("sort")]
		public void Sort(System.Delegate fn)
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
		
		#region Events
		/// <summary>Fires when a new child node is appended</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("append")]
		public event ext.auto.Delegate_ext_data_Tree_And_ext_data_Node_And_ext_data_Node_And_System_Number Append;
		
		/// <summary>Fires when a child node is removed</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("remove")]
		public event ext.auto.Delegate_ext_data_Tree_And_ext_data_Node_And_ext_data_Node Remove;
		
		/// <summary>Fires when this node is moved to a new location in the tree</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("move")]
		public event ext.auto.Delegate_ext_data_Tree_And_ext_data_Node_And_ext_data_Node_And_ext_data_Node_And_System_Number Move;
		
		/// <summary>Fires when a new child node is inserted.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("insert")]
		public event ext.auto.Delegate_ext_data_Tree_And_ext_data_Node_And_ext_data_Node_And_ext_data_Node Insert;
		
		/// <summary>Fires before a new child is appended, return false to cancel the append.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("beforeappend")]
		public event ext.auto.Delegate_ext_data_Tree_And_ext_data_Node_And_ext_data_Node Beforeappend;
		
		/// <summary>Fires before a child is removed, return false to cancel the remove.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("beforeremove")]
		public event ext.auto.Delegate_ext_data_Tree_And_ext_data_Node_And_ext_data_Node Beforeremove;
		
		/// <summary>Fires before this node is moved to a new location in the tree. Return false to cancel the move.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("beforemove")]
		public event ext.auto.Delegate_ext_data_Tree_And_ext_data_Node_And_ext_data_Node_And_ext_data_Node_And_System_Number Beforemove;
		
		/// <summary>Fires before a new child is inserted, return false to cancel the insert.</summary>
		/// <definedin>src\data\Tree.js</definedin>
		[ScriptName("beforeinsert")]
		public event ext.auto.Delegate_ext_data_Tree_And_ext_data_Node_And_ext_data_Node_And_ext_data_Node Beforeinsert;
		#endregion
	}
}
